Optimal. Leaf size=171 \[ \frac {B (b c-a d)^4 n x}{5 d^4}-\frac {B (b c-a d)^3 n (a+b x)^2}{10 b d^3}+\frac {B (b c-a d)^2 n (a+b x)^3}{15 b d^2}-\frac {B (b c-a d) n (a+b x)^4}{20 b d}-\frac {B (b c-a d)^5 n \log (c+d x)}{5 b d^5}+\frac {(a+b x)^5 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{5 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 171, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 45}
\begin {gather*} \frac {(a+b x)^5 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{5 b}-\frac {B n (b c-a d)^5 \log (c+d x)}{5 b d^5}+\frac {B n x (b c-a d)^4}{5 d^4}-\frac {B n (a+b x)^2 (b c-a d)^3}{10 b d^3}+\frac {B n (a+b x)^3 (b c-a d)^2}{15 b d^2}-\frac {B n (a+b x)^4 (b c-a d)}{20 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2548
Rubi steps
\begin {align*} \int (a+b x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx &=\int \left (A (a+b x)^4+B (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx\\ &=\frac {A (a+b x)^5}{5 b}+B \int (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=\frac {A (a+b x)^5}{5 b}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}-\frac {(B (b c-a d) n) \int \frac {(a+b x)^4}{c+d x} \, dx}{5 b}\\ &=\frac {A (a+b x)^5}{5 b}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}-\frac {(B (b c-a d) n) \int \left (-\frac {b (b c-a d)^3}{d^4}+\frac {b (b c-a d)^2 (a+b x)}{d^3}-\frac {b (b c-a d) (a+b x)^2}{d^2}+\frac {b (a+b x)^3}{d}+\frac {(-b c+a d)^4}{d^4 (c+d x)}\right ) \, dx}{5 b}\\ &=\frac {B (b c-a d)^4 n x}{5 d^4}-\frac {B (b c-a d)^3 n (a+b x)^2}{10 b d^3}+\frac {B (b c-a d)^2 n (a+b x)^3}{15 b d^2}-\frac {B (b c-a d) n (a+b x)^4}{20 b d}+\frac {A (a+b x)^5}{5 b}-\frac {B (b c-a d)^5 n \log (c+d x)}{5 b d^5}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 338, normalized size = 1.98 \begin {gather*} \frac {1}{60} \left (\frac {12 a^5 B n \log (a+b x)}{b}-\frac {12 B c \left (b^4 c^4-5 a b^3 c^3 d+10 a^2 b^2 c^2 d^2-10 a^3 b c d^3+5 a^4 d^4\right ) n \log (c+d x)}{d^5}+\frac {x \left (12 a^4 d^4 (5 A+4 B n)+12 a^3 b d^3 (-10 B c n+10 A d x+3 B d n x)+4 a^2 b^2 d^2 \left (30 A d^2 x^2+B n \left (30 c^2-15 c d x+4 d^2 x^2\right )\right )+b^4 \left (12 A d^4 x^4+B c n \left (12 c^3-6 c^2 d x+4 c d^2 x^2-3 d^3 x^3\right )\right )+a b^3 d \left (60 A d^3 x^3+B n \left (-60 c^3+30 c^2 d x-20 c d^2 x^2+3 d^3 x^3\right )\right )+12 B d^4 \left (5 a^4+10 a^3 b x+10 a^2 b^2 x^2+5 a b^3 x^3+b^4 x^4\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{d^4}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.46, size = 2372, normalized size = 13.87
method | result | size |
risch | \(\text {Expression too large to display}\) | \(2372\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 681 vs.
\(2 (160) = 320\).
time = 0.32, size = 681, normalized size = 3.98 \begin {gather*} \frac {1}{5} \, B b^{4} x^{5} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{5} \, A b^{4} x^{5} + B a b^{3} x^{4} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a b^{3} x^{4} + 2 \, B a^{2} b^{2} x^{3} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + 2 \, A a^{2} b^{2} x^{3} + 2 \, B a^{3} b x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + 2 \, A a^{3} b x^{2} + {\left (\frac {a n e \log \left (b x + a\right )}{b} - \frac {c n e \log \left (d x + c\right )}{d}\right )} B a^{4} e^{\left (-1\right )} - 2 \, {\left (\frac {a^{2} n e \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} n e \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c n - a d n\right )} x e}{b d}\right )} B a^{3} b e^{\left (-1\right )} + {\left (\frac {2 \, a^{3} n e \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} n e \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d n - a b d^{2} n\right )} x^{2} e - 2 \, {\left (b^{2} c^{2} n - a^{2} d^{2} n\right )} x e}{b^{2} d^{2}}\right )} B a^{2} b^{2} e^{\left (-1\right )} - \frac {1}{6} \, {\left (\frac {6 \, a^{4} n e \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} n e \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} n - a b^{2} d^{3} n\right )} x^{3} e - 3 \, {\left (b^{3} c^{2} d n - a^{2} b d^{3} n\right )} x^{2} e + 6 \, {\left (b^{3} c^{3} n - a^{3} d^{3} n\right )} x e}{b^{3} d^{3}}\right )} B a b^{3} e^{\left (-1\right )} + \frac {1}{60} \, {\left (\frac {12 \, a^{5} n e \log \left (b x + a\right )}{b^{5}} - \frac {12 \, c^{5} n e \log \left (d x + c\right )}{d^{5}} - \frac {3 \, {\left (b^{4} c d^{3} n - a b^{3} d^{4} n\right )} x^{4} e - 4 \, {\left (b^{4} c^{2} d^{2} n - a^{2} b^{2} d^{4} n\right )} x^{3} e + 6 \, {\left (b^{4} c^{3} d n - a^{3} b d^{4} n\right )} x^{2} e - 12 \, {\left (b^{4} c^{4} n - a^{4} d^{4} n\right )} x e}{b^{4} d^{4}}\right )} B b^{4} e^{\left (-1\right )} + B a^{4} x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a^{4} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 503 vs.
\(2 (160) = 320\).
time = 0.37, size = 503, normalized size = 2.94 \begin {gather*} \frac {12 \, {\left (A + B\right )} b^{5} d^{5} x^{5} + 3 \, {\left (20 \, {\left (A + B\right )} a b^{4} d^{5} - {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} n\right )} x^{4} + 4 \, {\left (30 \, {\left (A + B\right )} a^{2} b^{3} d^{5} + {\left (B b^{5} c^{2} d^{3} - 5 \, B a b^{4} c d^{4} + 4 \, B a^{2} b^{3} d^{5}\right )} n\right )} x^{3} + 6 \, {\left (20 \, {\left (A + B\right )} a^{3} b^{2} d^{5} - {\left (B b^{5} c^{3} d^{2} - 5 \, B a b^{4} c^{2} d^{3} + 10 \, B a^{2} b^{3} c d^{4} - 6 \, B a^{3} b^{2} d^{5}\right )} n\right )} x^{2} + 12 \, {\left (5 \, {\left (A + B\right )} a^{4} b d^{5} + {\left (B b^{5} c^{4} d - 5 \, B a b^{4} c^{3} d^{2} + 10 \, B a^{2} b^{3} c^{2} d^{3} - 10 \, B a^{3} b^{2} c d^{4} + 4 \, B a^{4} b d^{5}\right )} n\right )} x + 12 \, {\left (B b^{5} d^{5} n x^{5} + 5 \, B a b^{4} d^{5} n x^{4} + 10 \, B a^{2} b^{3} d^{5} n x^{3} + 10 \, B a^{3} b^{2} d^{5} n x^{2} + 5 \, B a^{4} b d^{5} n x + B a^{5} d^{5} n\right )} \log \left (b x + a\right ) - 12 \, {\left (B b^{5} d^{5} n x^{5} + 5 \, B a b^{4} d^{5} n x^{4} + 10 \, B a^{2} b^{3} d^{5} n x^{3} + 10 \, B a^{3} b^{2} d^{5} n x^{2} + 5 \, B a^{4} b d^{5} n x + {\left (B b^{5} c^{5} - 5 \, B a b^{4} c^{4} d + 10 \, B a^{2} b^{3} c^{3} d^{2} - 10 \, B a^{3} b^{2} c^{2} d^{3} + 5 \, B a^{4} b c d^{4}\right )} n\right )} \log \left (d x + c\right )}{60 \, b d^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 497 vs.
\(2 (160) = 320\).
time = 39.24, size = 497, normalized size = 2.91 \begin {gather*} \frac {B a^{5} n \log \left (b x + a\right )}{5 \, b} + \frac {1}{5} \, {\left (A b^{4} + B b^{4}\right )} x^{5} - \frac {{\left (B b^{4} c n - B a b^{3} d n - 20 \, A a b^{3} d - 20 \, B a b^{3} d\right )} x^{4}}{20 \, d} + \frac {{\left (B b^{4} c^{2} n - 5 \, B a b^{3} c d n + 4 \, B a^{2} b^{2} d^{2} n + 30 \, A a^{2} b^{2} d^{2} + 30 \, B a^{2} b^{2} d^{2}\right )} x^{3}}{15 \, d^{2}} + \frac {1}{5} \, {\left (B b^{4} n x^{5} + 5 \, B a b^{3} n x^{4} + 10 \, B a^{2} b^{2} n x^{3} + 10 \, B a^{3} b n x^{2} + 5 \, B a^{4} n x\right )} \log \left (b x + a\right ) - \frac {1}{5} \, {\left (B b^{4} n x^{5} + 5 \, B a b^{3} n x^{4} + 10 \, B a^{2} b^{2} n x^{3} + 10 \, B a^{3} b n x^{2} + 5 \, B a^{4} n x\right )} \log \left (d x + c\right ) - \frac {{\left (B b^{4} c^{3} n - 5 \, B a b^{3} c^{2} d n + 10 \, B a^{2} b^{2} c d^{2} n - 6 \, B a^{3} b d^{3} n - 20 \, A a^{3} b d^{3} - 20 \, B a^{3} b d^{3}\right )} x^{2}}{10 \, d^{3}} + \frac {{\left (B b^{4} c^{4} n - 5 \, B a b^{3} c^{3} d n + 10 \, B a^{2} b^{2} c^{2} d^{2} n - 10 \, B a^{3} b c d^{3} n + 4 \, B a^{4} d^{4} n + 5 \, A a^{4} d^{4} + 5 \, B a^{4} d^{4}\right )} x}{5 \, d^{4}} - \frac {{\left (B b^{4} c^{5} n - 5 \, B a b^{3} c^{4} d n + 10 \, B a^{2} b^{2} c^{3} d^{2} n - 10 \, B a^{3} b c^{2} d^{3} n + 5 \, B a^{4} c d^{4} n\right )} \log \left (-d x - c\right )}{5 \, d^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.56, size = 936, normalized size = 5.47 \begin {gather*} x^4\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{20\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{20\,d}\right )-x^3\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{15\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3\,d}+\frac {A\,a\,b^3\,c}{3\,d}\right )+\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (B\,a^4\,x+2\,B\,a^3\,b\,x^2+2\,B\,a^2\,b^2\,x^3+B\,a\,b^3\,x^4+\frac {B\,b^4\,x^5}{5}\right )+x\,\left (\frac {a^3\,\left (5\,A\,a\,d+10\,A\,b\,c+2\,B\,a\,d\,n-2\,B\,b\,c\,n\right )}{d}-\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {2\,a^2\,b\,\left (5\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{5\,b\,d}-\frac {a\,c\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{b\,d}\right )}{5\,b\,d}+\frac {a\,c\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{b\,d}\right )+x^2\,\left (\frac {a^2\,b\,\left (5\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{10\,b\,d}-\frac {a\,c\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{2\,b\,d}\right )+\frac {A\,b^4\,x^5}{5}-\frac {\ln \left (c+d\,x\right )\,\left (5\,B\,n\,a^4\,c\,d^4-10\,B\,n\,a^3\,b\,c^2\,d^3+10\,B\,n\,a^2\,b^2\,c^3\,d^2-5\,B\,n\,a\,b^3\,c^4\,d+B\,n\,b^4\,c^5\right )}{5\,d^5}+\frac {B\,a^5\,n\,\ln \left (a+b\,x\right )}{5\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________